package com.newcapec.lesson1;


import test.Person;
import test.Student;

public class Demo1 {
    int age = 100;

    class Demo2{

    }
    public  void main(String[] args) {
        System.out.println("--------------");
        System.out.println("--------------");
        System.out.println("--------------");
        System.out.println("--------------");
        Student student = new Student();

        //
        //OnlyPersonsss onlyPerson = new OnlyPersonsss();

       /* class OnlyPerson extends Person{

            @Override
            public void eat() {

            }
        }*/

        Person onlyPerson = new Person() {
            @Override
            public void eat() {
                age = 300;
                System.out.println("我与众不同，吃很奇怪的东西!!!");
            }
        };

    }

}
